<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:page="urn:page">
<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Css/admin/ui-v1.0.css" rel="stylesheet" type="text/css"/>
<xsl:text disable-output-escaping="yes">
<![CDATA[
<script type="text/javascript" src="/js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/js/admin/v3.2.js"></script>
<script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
$(function(){
	function doSave(callback){
		$('#htmlcontent').val(FCKeditorAPI.GetInstance('htmlcontent').GetXHTML(true))
		$.doCmd('Insert',
			{method:'post',query:$('#frmArticle').serialize(),
				success:callback})
	}
	$('#f_title,#f_intro').blur(function(){
		$('#'+this.id+'_length').html(this.value.length);
	});
	$('#btnSubmit,#btnSubmit1').click(function(){
		doSave(function(){location.href = 'list.html?guid='+$('#channelguid').val();})
	});
	$('#btnSave,#btnSave1').click(function(){
		doSave(function(code,data){alert(data);})
	});
	$('#btnPreview').click(function(){
		window.open($('#url').val())
	});
	$('#btnGoBack,#titleGoBack').click(function(){
		location.href= $('#_backurl_').val();
	});
})
</script>]]></xsl:text>
<title>编辑文章</title>
</head>
<input type="hidden" id="_backurl_" value="{page:xServer('HTTP_referer')}"/>
<body class="mainContent">
<!--外围边框-->
<div class="box"> 
	<!--管理菜单-->
	<xsl:value-of select="page:xLoadList('文章编辑标题',0,page:xIIF(count(rows/row)=0,page:xRequest('guid'),string(rows/row/f_channel_guid)))" disable-output-escaping="yes"/>
	<!--搜索及切换-->
	<form id="frmArticle" action="edit.html?f=Insert" method="post" target="_blank">
	<xsl:if test="count(rows/row)=0">
		<xsl:value-of select="page:xLoadList('AUTOID')" disable-output-escaping="yes"/>
	</xsl:if>
	<xsl:if test="count(rows/row)!=0">
		<input type="hidden"  name="articleid" value="{rows/row/id}"/>
		<input type="hidden" id="channelguid"  name="channelguid" value="{rows/row/f_channel_guid}"/>
		<input type="hidden" id="url"  name="url" value="{f_url}"/>
	</xsl:if>
	<div class="content pb10">
		<div class="tab mb10">
			<ul class="fl">
				<li class="check"><a><xsl:value-of select="page:xIIF(count(rows/row)=0,'新增','修改')"/>文章</a></li>
			</ul>
			<div class="fr button">
				<label class="font_gray fl">自动保存:
					<select name="">
						<option>30秒</option>
					</select>
				</label>
				<a href="###" class="btn2" id="btnSave1">保存</a><a href="###" class="btn2" id="btnPreview">预览</a><a href="###" class="btn2" id="btnSubmit1">完成提交</a>
			</div>
		</div>
		<div class="editcontent editbg">
			<table width="100%" cellpadding="2">
				<tbody>
					<tr>
						<td width="60" align="right">标题:</td>
						<td><input name="title" type="text" class="order longLong" id="f_title" value="{rows/row/f_title}" />
							[字数:<i id="f_title_length">0</i>字]</td>
					</tr>
					<tr>
						<td width="60" align="right">作者:</td>
						<td><input name="author" type="text" class="order short" id="author" value="{rows/row/f_author}" />
							属性:
							<select name="propoty" id="propoty">
								<option>原创帖</option>
								<option>翻译帖</option>
								<option>转载帖</option>
								<option>投稿帖</option>
							</select>
							来源:
							<select name="comefrom" id="comefrom">
								<option>800FC.COM</option>
							</select></td>
					</tr>
					<tr>
						<td width="60" align="right">关键字:</td>
						<td><input name="keywords" type="text" class="order longLong fl" id="keywords" value="{rows/row/f_keywords}" /><a class="icon baidu fl"></a></td>
					</tr>
					<tr>
						<td width="60" align="right"><span class="heightDd">简介:</span></td>
						<td>
						<xsl:if test="string-length(rows/row/f_intro)=0">
						<xsl:text disable-output-escaping="yes">
<![CDATA[
<textarea name="intro" id="f_intro" class="longLong" rows="4"></textarea>]]></xsl:text>
</xsl:if>
<xsl:if test="string-length(rows/row/f_intro)!=0">
<textarea name="intro" id="f_intro" class="longLong" rows="4"><xsl:value-of select="rows/row/f_intro"/></textarea>
</xsl:if>
[字数:<i id="f_intro_length">0</i>字]</td>
					</tr>
					<tr>
						<td width="60" align="right">文章评价:</td>
						<td><label>
								<input name="isreview" type="radio" class="checkbox" value="" />
								有 </label>
							<label>
								<input name="isreview" type="radio" class="checkbox" value="" />
								无</label></td>
					</tr>
					<tr>
						<td width="60" align="right">导读图:</td>
						<td><label>
								<input name="images" type="text" class="order longLong" id="images" value="{rows/row/f_images}"  />
							</label>
							<label><a href="###" class="btn">本地上传</a></label>
						</td>
					</tr>
					<tr>
						<td width="60" align="right">&nbsp;</td>
						<td>(图片将会在120x90底色为白色的画布中间，再按120x90的比例生成图片) </td>
					</tr>
					<tr>
						<td colspan="2">
						<xsl:if test="string-length(rows/row/f_content)=0">
						<xsl:text disable-output-escaping="yes">
						<![CDATA[
						<textarea name="htmlcontent" id="htmlcontent" class="longLong" rows="4"></textarea>]]></xsl:text>
						</xsl:if>
						<xsl:if test="string-length(rows/row/f_content)!=0">
						<textarea name="htmlcontent" id="htmlcontent" class="longLong" rows="4"><xsl:value-of select="rows/row/f_content"/></textarea>
						</xsl:if>
						</td>
					</tr>
					<!--<tr>
						<td>引用网页:</td>
						<td><label>
								<input name="" type="checkbox" class="checkbox" value="" />
								大图链小图</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="" />
								删除站外链接</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="" />
								图片描边</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="" />
								自动加水印</label>
							<label><a href="#" class="btn2">完成转载</a></label>
							<label class="fr">文章字数:<font class="font_red">0</font></label></td>
					</tr>
					<tr>
						<td width="60" align="right">发布设置:</td>
						<td><label>
								<input name="" type="checkbox" class="checkbox" value="" />
								自动关联汽车信息</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="" />
								生成链接词链接</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="" />
								自动查找相关文章</label>
							<label>
								<input name="" type="checkbox" class="checkbox" value="{rows/row/f_content}" />
								广告文字条</label></td>
					</tr>-->
					<tr>
						<td width="60">&nbsp;</td>
						<td><a href="###" class="btn2" id="btnSave">保存</a><a href="###" class="btn2">预览</a><a href="###" id="btnSubmit" class="btn">完成并提交</a></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	</form>
</div>
<script type="text/javascript">	
	(new FCKeditor('htmlcontent',null,400,'Admin','')).ReplaceTextarea();
	//$('#divcontent').html((new FCKeditor('htmlcontent',null,400,'Admin','')).CreateHtml());
</script>
</body>
</html>
</xsl:template>
</xsl:stylesheet>